package com.taplinker.client.crm.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.taplinker.dto.web.ActionProto.CSAction;
import com.taplinker.dto.web.ActionProto.CustomerAction;
import com.taplinker.dto.web.CustomerProto.Customer_V2;

public class CustomerInfo implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private Customer_V2 customer_V2;//客户信息
	private String visitorId;//访问ID
	private List<CSAction> clientAction = new ArrayList<CSAction>();//企业时光流
	private List<CustomerAction> customerAction =  new ArrayList<CustomerAction>();//客户时光轴
	
	public String getVisitorId() {
		return visitorId;
	}
	public void setVisitorId(String visitorId) {
		this.visitorId = visitorId;
	}
	public Customer_V2 getCustomer() {
		return customer_V2;
	}
	public void setCustomer(Customer_V2 customer_V2) {
		this.customer_V2 = customer_V2;
	}
	public List<CSAction> getClientAction() {
		return clientAction;
	}
	public void setClientAction(List<CSAction> clientAction) {
		this.clientAction = clientAction;
	}
	public List<CustomerAction> getCustomerAction() {
		return customerAction;
	}
	public void setCustomerAction(List<CustomerAction> customerAction) {
		this.customerAction = customerAction;
	}
	
	public void addClientAction(List<CSAction> action)
	{
		clientAction.addAll(action);
		if(customer_V2!=null)
			CrmDataCenter.getInstance().noticeListener(customer_V2.getVistorId()+"CLIENT");
		else
			CrmDataCenter.getInstance().noticeListener(getVisitorId()+"CLIENT");
	}
	
	public void clearClientAction()
	{
		clientAction.clear();
	}
	
	public void clearCustomerAction(){
		customerAction.clear();
	}
	
	public void addCustomerAction(List<CustomerAction> action)
	{
		customerAction.addAll(action);
		if(customer_V2!=null)
			CrmDataCenter.getInstance().noticeListener(customer_V2.getVistorId()+"Customer_V2");
		else
			CrmDataCenter.getInstance().noticeListener(getVisitorId()+"Customer_V2");
	}
}
